package com.jbp.dao;

import com.jbp.model.RoomBlock;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 
 * 
 * @author lucheng feng
 * @email jbp@gmail.com
 * @date 2020-06-20 12:50:08
 */

public interface RoomBlockDao extends BaseMapper<RoomBlock> {

    @Select("select user_id from room_block where room_id=#{roomId} and (type = #{type} or type='all')")
    List<Integer> getIds(@Param("roomId") Integer roomId,@Param("type") String type);
}
